#include <stdio.h> 
int main()
{
	freopen("test.in", "r", stdin);
	freopen("test.out", "w", stdout);
	int a = 0, n = 0;
	scanf("%d %d", &a, &n);
	int sum = 0;
	int data = a;
	for ( int i = 0; i < n; i++ ) {
		sum += data;
		data = data * 10 + a;
	}
	printf("%lld", sum);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
